ci: adopt consolidated ospo-reusable-workflows release.yaml#552
Merged
Conversation
## What Collapse the three legacy `release` / `release_image` / `release_discussion` job calls into a single call to the consolidated `release.yaml` reusable workflow at v1.0.0 (`592067a6...`). Pass `image-name`, `create-attestation: true`, and `create-discussion: true` so the workflow handles GitHub release, container image build/push to GHCR, build provenance attestation, and announcement discussion in one draft-first pipeline. Also add a "💥 Breaking Changes" category to `release-drafter.yml`. ## Why The legacy three-workflow setup forced callers to wire up the same job chain by hand in every repo and made it easy for permissions, secrets, and ordering to drift. v1.0.0 of ospo-reusable-workflows owns the chain internally and exposes a single entry point. The "Breaking Changes" category matches the upstream release-drafter template (github-community-projects/ospo-reusable-workflows#134); the `breaking` label already maps to a major bump in `version-resolver`, so this just surfaces those PRs in their own changelog section. ## Notes - The job-level permission block now lists the union of what the called workflow's internal jobs need (contents/pull-requests/packages/id-token/attestations/discussions). A `uses:` caller can only grant — never expand — what the reusable workflow requests, so missing perms here silently disable features instead of erroring. - `image-registry` and `image-registry-username` moved from `secrets:` to inputs in v1.0.0 (defaults to `ghcr.io` and `github.actor`). Both defaults match the previous explicit values, so they're omitted. - `image-registry-password` stays a secret and continues to use `GITHUB_TOKEN` for ghcr.io pushes. - The reusable workflow's `release_discussion` job validates the discussion secrets at the step level and skips with a notice if they're unset, so the workflow keeps working even if the discussion secrets aren't configured. Signed-off-by: jmeridth <jmeridth@gmail.com>
Single-space before `#` so prettier (via super-linter) accepts the workflow file. No behavior change. Signed-off-by: jmeridth <jmeridth@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Proposed Changes
Collapse the three legacy
release/release_image/release_discussionjob calls into a single call to the consolidatedrelease.yamlreusable workflow at v1.0.0 (592067a6...). The new workflow handles GitHub release creation, container image build/push to GHCR, build provenance attestation, and the announcement discussion in one draft-first pipeline.Also add a "💥 Breaking Changes" category to
release-drafter.yml, matching the upstream release-drafter template (github-community-projects/ospo-reusable-workflows#134). Thebreakinglabel was already wired up underversion-resolver.major, so this just surfaces those PRs in their own changelog section.Notes for reviewers
uses:caller can only grant — never expand — what the reusable workflow requests, so missing perms here silently disable features instead of erroring.image-registry/image-registry-usernamemoved fromsecrets:to inputs in v1.0.0 and default toghcr.io/github.actor. Both defaults match the previous values, so the inputs are omitted.image-registry-passwordstays a secret and continues usingGITHUB_TOKENfor GHCR pushes.release_discussionjob validates the discussion secrets at the step level and skips with a notice if they're unset, so the workflow keeps working even if the discussion secrets aren't configured for this repo.Readiness Checklist
Author/Contributor
make lintand fix any issues that you have introducedmake testand ensure you have test coverage for the lines you are introducingTesting
make lint— clean (mypy 0 issues across 12 source files, black 12 files unchanged).make test— 174 tests + 32 subtests pass, coverage 98.97%.feature/fix/breaking/vuln/releaselabel that firespull_request_target: closed. Watch for: draft release created by release-drafter, container image published toghcr.io/$REPO, build provenance attestation succeeding, release announcement discussion created (ifRELEASE_DISCUSSION_*secrets are set), thenpublish_releaseflipping the draft to published.